﻿/* ==============================================================================
 * 功能描述：LoginPanel  
 * 
 * 创 建 者：郑镇泉
 * 
 * 创建日期：2016/4/6 17:52:43
 * ==============================================================================*/
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using ZZQFrameWork;

public class LoginPanel : BaseUI
{
    /// <summary>
    /// 开始游戏按钮
    /// </summary>
    private Button startGameButton; 

    public override Enum_UIType GetUIType()
    {
        return Enum_UIType.LoginPanel;
    }

    protected override void OnAwake()
    {
        startGameButton = transform.GetComponentByPath<Button>("BG/Button_StartGame");
        startGameButton.onClick.AddListener(OnStartGameButtonClick);
    }

    protected override void OnPlayMusic()
    {
        SoundManager.Instance.PlayMusic("1001");
    }

    private void OnStartGameButtonClick()
    {
        SoundManager.Instance.PlayEffect("4");
        UIManager.Instance.CloseAllUI();
        Debug.Log("点击开始游戏");
        SceneManager.LoadScene("Game");
    }
}